@import 'includes';

/* https://markdotto.com/2018/02/07/github-system-fonts/ */
$fonts: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

body {
  font-family: $fonts;
  color: #333;
  font-size: 16px;
  line-height: 1.6;
}

p {
  margin: 1.25em 0;
}

em, i {
  font-style: italic;
}

strong, b {
  font-weight: bold;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: bold;
  margin: 1.5em 0 1em 0;
  line-height: 1em;
}

h1 {
  font-size: 1.625em;
}
h2 {
  font-size: 1.375em;
}
h3 {
  font-size: 1.125em;
}
h4 {
  font-size: 1em;
}
h5 {
  font-size: 0.875em;
}
h6 {
  font-size: 0.75em;
}

h4, h5, h6 {
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2.5em;
}

a {
  color: #2200CC;
  transition: color 0.1s ease;

  &:hover {
    color: #5544FF;
  }
}

ol li {
  list-style: decimal;
  margin-left: 1.25em;
  margin-bottom: 0.2em;
}

ul li {
  list-style: disc;
  margin-left: 1.25em;
  margin-bottom: 0.2em;
}

dt {
  font-weight: bold;
}
dd {
  margin-left: 1.25em;
}

hr {
  margin: 2em 0;
  border: 0;
  border-top: 2px dotted #aaa;
}

pre, code {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  border-radius: 3px;
}
code {
  background: #f9f9f9;
  font-size: 0.9em;
  padding: 0.25em 0.5em;
  color: #9E525A;
}
pre code {
  background: #f9f9f9;
  display: block;
  margin: 1em 0;
  padding: 0.75em 1em;
  color: inherit;
}

img, video {
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}
figure {
  width: 100%;
  margin: 2em 0;
  text-align: center;
}
figcaption {
  p {
    margin: 0;
  }
  text-align: center;
  font-size: 0.9em;
  color: #666;
}

blockquote {
  padding-left: 1.25em;
  padding-right: 1.5em;
  border-left: .25em solid #eee;
  color: #666;
}

table {
  margin-bottom: 1em;
  width: 100%;
  border: 1px solid #ddd;
}

td, th {
  vertical-align: middle;
  padding: .25rem .5rem;
  border: 1px solid #ddd;
}

th {
  font-weight: bold;
}

tbody tr:nth-child(2n+1) td, tbody tr:nth-child(2n+1) th {
  background-color: #f8f8f8;
}

sup, sub {
  font-size: 0.8em;
}
sup {
  vertical-align: super;
}

main {
  max-width: 740px;
  padding: 0 20px;
  margin: 0 auto;
}

header h2 {
  margin: 1em;
  a {
    text-decoration: none;
    border: none;
    color: #77f !important;

    &:hover {
      color: #f77 !important;
    }

    &:active {
      color: #2a2 !important;
    }
  }
}

.combined-title-pagination {
  margin-top: 2.5em;
  h1 {
    display: inline;
    a {
      text-decoration: none;
      border: none;
    }
  }
  h3 {
    display: inline;
    margin-left: 0.2em;
  }
}

.title-group {
  .title h1 {
    margin-bottom: 0.5em;
  }
  .date h5 {
    color: #888;
    margin: 0;
  }
  margin-bottom: 1.5em;
}

footer {
  margin-top: 3em;
  .content-container {
    background: #eee;
    padding: 2em 0;
    .content {
      max-width: 740px;
      padding: 0 20px;
      margin: 0 auto;
    }
  }
}

.horizontal-links {
  width: 100%;
  margin-top: 0;
  margin-bottom: 0.25em;
  a {
    border-right: 2px solid #ccc;
    padding-right: 0.5em;
    margin-right: 0.5em;
  }
  a:last-child {
    border: none;
  }
  &:last-child {
    margin-bottom: 1.25em;
  }
}

.post-list {
  h1 a {
    color: #333;
    text-decoration: none;
    border: none;

    &:hover {
      color: #5544FF;
    }
  }
  .read-more {
    margin-bottom: 1.25em;
  }

  padding-bottom: 1em;
  border-bottom: 1px solid #ccc;
}

.tags {
  font-size: 0.9em;
  .links {
    display: inline;
    margin-left: 0.5em;
    a {
      color: #aaa;
      text-decoration: none;
      border-bottom: none;
      &:hover {
        color: #888;
        text-decoration: underline;
      }
    }
  }
}

.paginator {
  margin: 2em 0;
  .disabled {
    color: #aaa;
  }
  .newer {
    float: right;
    clear: both;
  }
}

.current-page {
  color: #aaa;
}

.album {
  .date, .date h5, .location, .location h5 {
    display: inline;
  }
  .location {
    color: #888;
    border-left: solid 2px #ccc;
    padding-left: 1em;
    margin-left: 1em;
  }
  .photos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.7em 0.7em;
    a {
      display: grid;
    }
    a.full-size {
      grid-column-start: 1;
      grid-column-end: 3;
    }
  }
}

@media (max-width:400px) {
  body {
    font-size: 14px;
  }
  .album .photos {
    grid-template-columns: 1fr;
    a {
      grid-column-start: 1;
      grid-column-end: 3;
    }
  }
}